﻿using BLL.LoginBLL;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace BookSystem
{
    public partial class AddLoginForm : Form
    {
        private static AddLoginForm _addLoginForm = null;
        public static AddLoginForm GetAddLoginForm()
        {
            if (_addLoginForm == null)
                _addLoginForm = new AddLoginForm();
            return _addLoginForm;
        }
        public AddLoginForm()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            LoginBll loginBll = new LoginBll();
            int result = loginBll.AddAdminInfo(tbName.Text.Trim(), tbPwd.Text.Trim());
            if(result > 0)
            {
                MessageBox.Show("注册成功");
            }
            else
            {
                MessageBox.Show("注册失败");
            }
        }
    }
}
